package org.redmagic.client;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.log4j.BasicConfigurator;
import org.redmagic.client.test.ListTestClass;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Start {

	private static final Log LOG = LogFactory.getLog(Start.class);
	
	public static void main(String[] args) {

		BasicConfigurator.configure();
		ClassPathXmlApplicationContext appCtx = new ClassPathXmlApplicationContext("spring-config.xml", "test-config.xml");
//		TestClass testClass = appCtx.getBean(TestClass.class);
//		LOG.info(testClass.getList());
//		System.out.println("DatabaseUser: " + testClass.getProperty1());
//		System.out.println("DatabaseHost: " + testClass.getProperty2());
//		System.out.println("DatabasePassword: " + testClass.getProperty3());
//		System.out.println("list: " + testClass.getList());
		
		ListTestClass listTestClass = appCtx.getBean(ListTestClass.class);
		LOG.info(listTestClass.getList());
	}

}
